<%@ page import="com.touzi.beans.dbs.users.User" %>
<%@ page import="org.apache.ibatis.session.SqlSession" %>
<%@ page import="org.apache.ibatis.session.SqlSessionFactory" %>
<%@ page import="com.touzi.constants.DbCons" %>
<%@ page import="com.touzi.mapper.UserMapper" %>
<%@ page import="java.util.List" %>
<%@ page import="java.net.URLEncoder" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%

%>

<%
    boolean isok=false;

    try {
        isok= (boolean) session.getAttribute("isok");
    } catch (Exception e) {
        e.printStackTrace();
    }

    if (!isok) {
        String msg = "登陆失效，请退出后重新登陆！";
        response.sendRedirect("/admdeskjsps/msg.jsp?msg=" + URLEncoder.encode(msg, "utf-8"));
        return;
    }
    String username = (String) session.getAttribute("user");
%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>layPage快速使用</title>
    <link rel="stylesheet" href="/layui/css/layui.css" media="all">
</head>
<body style="margin: auto;padding: 16px">


<table class="layui-hide" id="LAY_table_user" lay-filter="user"></table>


<script src="/layui/layui.js"></script>

<script type="text/html" id="barDemo">
    <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
</script>

<script>
    layui.use('table', function () {
        var table = layui.table;

        //方法级渲染id  | yonghu  | dingdan              | qici | jiner | chuangjianshijian   | jiedongshijian      | lingqushijian | lingqu
        table.render({
            elem: '#LAY_table_user'
            ,
            url: '/admdesk'
            ,
            where: {method: "fenhongjihua"}
            ,
            cols: [[
                {field: 'id', title: 'ID'}
                , {field: 'yonghu', title: '用户'}
                , {field: 'dingdan', title: '订单'}
                , {field: 'qici', title: '期次'}
                , {field: 'jiner', title: '金额'}
                , {field: 'chuangjianshijian', title: '创建时间'}
                , {field: 'jiedongshijian', title: '分红时间'}
                , {field: 'lingqu', title: '已分红'}
            ]]
            ,
            id: 'testReload'
            ,
            page: {
                limit: 30,
                layout: ['prev', 'page', 'next', 'count', 'skip', 'refresh'],
                next: '下一页',
                prev: '上一页',
                groups: 10
            }
        });


    });

</script>
</body>
</html>